<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateInjectVchanHistorysTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::dropIfExists('inject_vchan_historys');
        Schema::create('inject_vchan_historys', function (Blueprint $table) {
            $table->increments('id');
            // 批次号
            $table->string('batch_no')->nullable();
            // 任务号
            $table->string('task_no')->nullable();
            // 完成数
            $table->integer('done_count')->unsigned()->default(0);
            // 总数
            $table->integer('count')->unsigned()->default(0);
            // 耗时
            $table->float('consuming_time', 8, 2)->default(0);
            // 内存使用
            $table->float('used_memory', 8, 2)->default(0);
            // 内容
            $table->text('content')->nullable();
            // 用户-注入人
            $table->integer('user_id')->unsigned()->default(0);
            $table->timestamps();
            // $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
